/*
 * @Description:
 * @Date: 2024-07-05 09:10:40
 * @LastEditTime: 2024-07-20 16:42:49
 */
import { http } from '@/utils/http'

/** POST 请求 */
export const reportCreateAPI = (data) => {
  return http({
    url: `/app-api/countryside/report/create`,
    method: 'POST',
    data,
  })
}

// 获得首页轮播图
export const getbannerPage = (data) => {
  return http({
    url: `/admin-api/countryside/carousel_image/page`,
    method: 'POST',
    data,
  })
}
// 获得党建要闻tab
export const getNews = (query) => {
  return http({
    url: `/admin-api/system/dict-data/page`,
    method: 'GET',
    query,
  })
}
// 获得党建要闻详情
export const getNewsDetails = (id) => {
  return http({
    url: '/admin-api/countryside/party_building_news/get?id=' + id,
    method: 'GET',
  })
}

// 获得党建要闻内容
export const getNewsContent = (data) => {
  return http({
    url: `/admin-api/countryside/party_building_news/page`,
    method: 'POST',
    data,
  })
}
// 获得党员学习page
export const getStudy = (query) => {
  return http({
    url: `/app-api/countryside/study-materials/page`,
    method: 'GET',
    query,
  })
}
// 获得党员学习详情
export const getTobeDetail = (query) => {
  return http({
    url: `/app-api/countryside/study-materials/get`,
    method: 'GET',
    query,
  })
}
// 获得问题分页
export const getAnswer = (query) => {
  return http({
    url: `/app-api/countryside/learning-questions/page`,
    method: 'GET',
    query,
  })
}
// 提交答案
export const submitAnswer = (data, query) => {
  return http({
    url: `/app-api/countryside/study-materials/answers`,
    method: 'PUT',
    data,
    query,
  })
}
// 获取通知公告
export const getMessage = (data) => {
  return http({
    url: `/admin-api/countryside/notice/page`,
    method: 'POST',
    data,
  })
}
// 获得通知公告详情
export const getMessageDetails = (id) => {
  return http({
    url: '/admin-api/countryside/notice/get?id=' + id,
    method: 'GET',
  })
}

// 获得通知公告分类
export const getMessageClass = (query) => {
  return http({
    url: `/admin-api/system/dict-data/page`,
    method: 'GET',
    query,
  })
}
